package org.hzz.promotions.domain.service.impl;

import io.gitee.pkmer.convention.service.BaseDomainService;
import org.hzz.promotions.domain.entity.CouponScopeEntity;
import org.hzz.promotions.domain.repository.CouponScopeRepository;
import org.hzz.promotions.domain.service.CouponScopeDomainService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author <a href="mailto:1193094618@qq.com">pkmer</a>
 * <br>
 * <a href = "https://gitee.com/developeros/videos-online">Code Repository</a>
 * At 2024/8/30
 * 优惠券范围服务
 */

@Service
public class CouponScopeDomainServiceImpl
        extends BaseDomainService<CouponScopeRepository>
        implements CouponScopeDomainService {
    @Override
    public void insertCouponScope(CouponScopeEntity entity) {
        repository.insertCouponScope(entity);
    }

    @Override
    public void batchInsertCouponScope(List<CouponScopeEntity> entities) {
        repository.batchInsertCouponScope(entities);
    }

    @Override
    public void deleteCouponScope(Long couponId) {
        repository.deleteCouponScopeByCouponId(couponId);
    }

    @Override
    public List<CouponScopeEntity> getCouponScopeByCouponId(Long couponId) {
        return repository.getCouponScopeByCouponId(couponId);
    }
}
